//
//  RQModel.swift
//  RuiQue-Swift
//
//  Created by xiute on 2018/10/30.
//  Copyright © 2018 cuijin. All rights reserved.
//

import UIKit

//类似这种解析类 如果是基本数据类型 可以使用JSONDecoder这种来做  但是现在没有接口文档 我为了保证健壮性 先使用赋值的方式

class RQModel: NSObject {
    var symbol: String?
    var quoteAssetName: String?
    var baseAssetUnit: String?
    var baseAssetName: String?
    var baseAsset: String?
    var tickSize: String?
    var high: String?
    var low: String?
    var matchingUnitType: String?
    var close: String?
    var quoteAsset: String?
    var withdrawFee: String?
    var volume: String?
    var quoteAssetUnit: String?
    var open: String?
    var status: String?
    
    var tradedMoney: NSNumber?
    var prevClose: NSNumber?
    var activeBuy: NSNumber?
    var lastAggTradeId: NSNumber?
    var productType: NSNumber?
    var active: NSNumber?
    var minTrade: NSNumber?
    var activeSell: NSNumber?
    var decimalPlaces: NSNumber?
    var minQty: NSNumber?
    
    init(dataDic: Dictionary<String, Any>) {
        super.init()
        self.minQty = dataDic["minQty"] as? NSNumber;
        self.decimalPlaces = dataDic["decimalPlaces"] as? NSNumber;
        self.activeSell = dataDic["activeSell"] as? NSNumber;
        self.minTrade = dataDic["minTrade"] as? NSNumber;
        self.active = dataDic["active"] as? NSNumber;
        self.productType = dataDic["productType"] as? NSNumber;
        self.lastAggTradeId = dataDic["lastAggTradeId"] as? NSNumber;
        self.activeBuy = dataDic["activeBuy"] as? NSNumber;
        self.prevClose = dataDic["prevClose"] as? NSNumber;
        self.tradedMoney = dataDic["tradedMoney"] as? NSNumber;
        self.status = dataDic["status"] as? String;
        self.open = dataDic["open"] as? String;
        self.quoteAssetUnit = dataDic["quoteAssetUnit"] as? String;
        self.volume = dataDic["volume"] as? String;
        self.withdrawFee = dataDic["withdrawFee"] as? String;
        self.quoteAsset = dataDic["quoteAsset"] as? String;
        self.close = dataDic["close"] as? String;
        self.matchingUnitType = dataDic["matchingUnitType"] as? String;
        self.low = dataDic["low"] as? String;
        self.high = dataDic["high"] as? String;
        self.tickSize = dataDic["tickSize"] as? String;
        self.baseAsset = dataDic["baseAsset"] as? String;
        self.baseAssetName = dataDic["baseAssetName"] as? String;
        self.baseAssetUnit = dataDic["baseAssetUnit"] as? String;
        self.quoteAssetName = dataDic["quoteAssetName"] as? String;
        self.symbol = dataDic["symbol"] as? String;
    }
    
    
}
